//
// File:	util.cpp
// Author:	Thomas TISSOT-DUPONT
// E-mail:	<thomas.tissotdupont@free.fr>
// Create:	02/02/2010 16:29:17
// Purpose:	
//
#include "util.hpp"

//------------------------------------------------------------------
// String Utility Functions
//------------------------------------------------------------------
std::string util::tolower(const std::string &s)
{
	std::string s2(s);
	std::string::iterator it = s2.begin();
	std::string::iterator ite = s2.end();
	for (; it != ite; ++it)
		*it = ::tolower(*it);
	return s2;
}

std::string util::toupper(const std::string &s)
{
	std::string s2(s);
	std::string::iterator it = s2.begin();
	std::string::iterator ite = s2.end();
	for (; it != ite; ++it)
		*it = ::toupper(*it);
	return s2;
}
